package com.game.data.vo
{
    import base.BaseVO;
    
    import com.dusk.util.ArrayUtil;
    
    public class ActionRecordVO extends BaseVO
    {
        public function ActionRecordVO()
        {
            super();
        }
        
        private const NORMAL_ACTION:Array = [
                "idle",
                "idle2",
                "walk",
                "run",
                "jump1",
                "jump2",
                "jump3",
                "hurt"
        ]
        
        private var _universal:Array = [];
        private var _action:Array = [];
        
        public function addAction(act:String):void
        {
            _universal.push(act);
            if(!ArrayUtil.contains(NORMAL_ACTION, act))
            {
                _action.push(act);
            }
        }
        
        public function getLastSkillAction():String
        {
            return _action[_action.length - 1];
        }
        
        public function getLastAction():String
        {
            return _universal[_universal.length - 1];
        }
    }
}
